class Restaurant():
    """定义一个餐厅类"""

    def __init__(self, restaurant_name, cuisine_type):
        self.restaurant_name = restaurant_name
        self.cuisine_type = cuisine_type
        self.number_served = 1

    def read_number_served(self):
        print("%s people have been there." % self.number_served)

    def set_number_served(self, number):
        if number >= 0:
            self.number_served = number
        else:
            print("您的输入有误!")

    def increment_number_served(self, numbers):
        self.number_served += numbers

    def describe_restaurant(self):
        print("The restaurant's name is %s ." % self.restaurant_name)
        print("The cuisine type of this restaurant is %s " % self.cuisine_type)

    def open_restaurant(self):
        print("The restaurant  %s is opening now." % self.restaurant_name)


restaurant_ali = Restaurant('阿里巴巴', '中国风')
restaurant_ali.describe_restaurant()
restaurant_ali.open_restaurant()

restaurant_chuan = Restaurant('老重庆', '川味')
restaurant_chuan.describe_restaurant()

restaurant_mhsg = Restaurant('美好时光', '湘味')
restaurant_mhsg.describe_restaurant()

restaurant = Restaurant('稻香', '粤菜')
restaurant.read_number_served()

restaurant.set_number_served(10)
restaurant.read_number_served()

restaurant.increment_number_served(20)
restaurant.read_number_served()
